package com.pojo;


import com.auto.annotation.AutoCode;
import com.auto.annotation.Column;
import com.auto.annotation.MyFunction;
import com.auto.annotation.Table;

import java.io.Serializable;

/**
 * 基本公式类
 */
@AutoCode(isOverride = false, showWay = "list")
@Table(jsname = "基本公式",name="PRFM_DIC_BASEFORMULA")
@MyFunction(autoInitFromAccess = true)
public class BaseFormula implements Serializable{

	private static final long serialVersionUID = -3916103980318562011L;
	@Column(flag="primary",jsname = "单位编号",jswidth = 150)
	private String companyid;
	@Column(flag="primary",treeId = true
			, treecolumn = true,jsname = "占位名称"
			, jswidth = 150, jsAllowBlank = false, jsValidator = true, keyWordFilte = true)
	private String name;
	@Column(type = "varchar(300)",oth = "NOT NULL",jsname = "公式内容", keyWordFilte = true)
	private String formula;
	@Column(jsname = "状态", render = "function(v){if(v=='0'){return '<span style=\"color:green\"><b>启用中</b></span>';}else {return '<span style=\"color:red\"><b>已停用</b></span>';}}",
			jsxtype = "radiogroup [items:[{"
					+ "inputValue: '0',"
					+ "boxLabel: '启用',"
					+ "anchor  : '60%',"
					+ "name  : 'isstop',"
					+ "checked: true"
					+ "}, {"
					+ "inputValue: '1',"
					+ "anchor  : '60%',"
					+ "name  : 'isstop',"
					+ "boxLabel: '停用'"
					+ "}]]")
	private int isstop;
	@Column(oth = "NOT NULL",jsname = "类型", render = "function(v){if(v=='PQL'){return '<span style=\"color:green\"><b>PQL语法</b></span>';}else {return '<span style=\"color:red\"><b>SQL语法</b></span>';}}",
			jsxtype = "radiogroup [items:[{"
					+ "inputValue: 'PQL',"
					+ "boxLabel: 'PQL',"
					+ "anchor  : '60%',"
					+ "name  : 'type',"
					+ "checked: true"
					+ "}, {"
					+ "inputValue: 'SQL',"
					+ "anchor  : '60%',"
					+ "name  : 'type',"
					+ "boxLabel: 'SQL'"
					+ "}]]")
	private String type;//SQL OR PQL[自定义公式]

	public String getCompanyid() {
		return companyid;
	}

	public void setCompanyid(String companyid) {
		this.companyid = companyid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getIsstop() {
		return isstop;
	}

	public void setIsstop(int isstop) {
		this.isstop = isstop;
	}

	public String getFormula() {
		return formula;
	}

	public void setFormula(String formula) {
		this.formula = formula;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
}
